/*
 * \brief  Root interface
 * \author Norman Feske
 * \date   2006-05-11
 */

/*
 * Copyright (C) 2006-2009 Norman Feske
 * Genode Labs, Feske & Helmuth Systementwicklung GbR
 *
 * This file is part of the Genode OS framework, which is distributed
 * under the terms of the GNU General Public License version 2.
 */

#ifndef _INCLUDE__ROOT__ROOT_H_
#define _INCLUDE__ROOT__ROOT_H_

#include <base/exception.h>
#include <base/session_control.h>

namespace Genode {

	class Root : public Session_control
	{
		protected:

			enum Opcode { SESSION, CLOSE };

		public:

			/*********************
			 ** Exception types **
			 *********************/

			class Quota_exceeded : public Exception { };
			class Invalid_args   : public Exception { };


			virtual ~Root() { }

			/**
			 * Create session
			 *
			 * \throw Quota_exceeded
			 * \throw Invalid_args
			 *
			 * \return capability to new session
			 */
			virtual Session_capability session(const char *args) = 0;
	};
}

#endif /* _INCLUDE__ROOT__ROOT_H_ */
